package com.sky.config;

import com.sky.properties.AliOssProperties;
import org.springframework.context.annotation.Bean;
import com.sky.utils.AliOssUtil;
import org.springframework.context.annotation.Configuration;

/**
 * @Author:JinFeng
 * @Date: 2025/06/13 20:00
 * @Description:
 */
@Configuration
public class AliOssConfig {
    /*
    * 文件上传阿里云OSS对应的Bean
    * @param aliOssProperties
    * @return
    * */
    @Bean
    public AliOssUtil aliOssUtil(AliOssProperties aliOssProperties){
        return new AliOssUtil(
                aliOssProperties.getEndpoint(),
                aliOssProperties.getAccessKeyId(),
                aliOssProperties.getAccessKeySecret(),
                aliOssProperties.getBucketName()
        );
    }

}
